package com.itsu.application.entity;

import java.io.Serializable;

public class User implements Serializable {

	private static final long serialVersionUID = 8838417023757198930L;

	private String userId;

	private String password;

	private String userName;

	private String adminTag;

	public User() {
	}

	public User(String userId, String password, String userName, String adminTag) {
		this.userId = userId;
		this.password = password;
		this.userName = userName;
		this.adminTag = adminTag;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getPassword() {
		return password;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((adminTag == null) ? 0 : adminTag.hashCode());
		result = prime * result + ((password == null) ? 0 : password.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		result = prime * result + ((userName == null) ? 0 : userName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (adminTag == null) {
			if (other.adminTag != null)
				return false;
		} else if (!adminTag.equals(other.adminTag))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		if (userName == null) {
			if (other.userName != null)
				return false;
		} else if (!userName.equals(other.userName))
			return false;
		return true;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getAdminTag() {
		return adminTag;
	}

	public void setAdminTag(String adminTag) {
		this.adminTag = adminTag;
	}

}
